<?php

namespace App\Http\Controllers;

use App\Model\Article;
use Illuminate\Http\Request;

class AnswerController extends Controller
{
    //

    public function index(Article $article)
    {
        $answers = $article->answers();
        return view('answer/index',compact('answers'));
    }

    public function create(Request $request)
    {
        $this->validate($request,[
           'name'=>'required|min:1|max:20',
           'email'=>'required|email',
           'content'=>'required|min:1',
        ]);

    }
}
